#ifndef WF_DRAWCIRCLE2P_H
#define WF_DRAWCIRCLE2P_H

#include "pf_previewactioninterface.h"
#include "pf_circle.h"
#include "gui_export.h"

/**
 * This action class can handle user events to draw 
 * simple arcs with the center, radius, start- and endangle given.
 *
 */
class GUI_EXPORT WF_DrawCircle2P : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetPoint1,       /**< Setting the 1st point. */
        SetPoint2        /**< Setting the 2nd point. */
    };

public:
    WF_DrawCircle2P(PF_Container& container,
                          PF_GraphicView& graphicView);
    ~WF_DrawCircle2P();

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

    void reset();

    virtual void init(int status=0);
	
    virtual void trigger();
	void preparePreview();
	
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
	
	virtual void coordinateEvent(PF_CoordinateEvent* e);
    virtual void commandEvent(PF_CommandEvent* e);
	virtual PF_StringList getAvailableCommands();

    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

protected:
    /**
     * Circle data defined so far.
     */
    PF_CircleAttribute data;
    /**
     * 1st point.
     */
    PF_Vector point1;
    /**
     * 2nd point.
     */
    PF_Vector point2;
};

#endif
